package com.ruoyi.community.mapper;

import com.ruoyi.community.domain.MessageRemind;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 操作提醒表
 */
public interface MessageRemindMapper {

    public MessageRemind selectMessageRemindById(Long id);

    public List<MessageRemind> selectMessageRemindList(MessageRemind messageRemind);

    public int deleteMessageRemindById(Long id);

    public int deleteMessageRemindByIds(Long[] ids);

    // 插入单个提醒
    public int insertMessageRemind(MessageRemind messageRemind);

    // 批量插入提醒
    int insertRemindBatch(@Param("list") List<MessageRemind> list);

    // 统计未读提醒条数
    int getUnreadRemindCount(@Param("communityId") int communityId, @Param("userId") Long userId);

    // 分页查询提醒
    List<MessageRemind> selectRemindListPage(@Param("communityId") int communityId, @Param("userId") Long userId, @Param("start") int start, @Param("end") int end);

    // 更新消息的状态
    public int updateMessageRemind(MessageRemind messageRemind);
}
